from django.db import models


# Create your models here.
class UserModel(models.Model):
    username = models.CharField(max_length=32, unique=True, null=False, verbose_name='用户名')
    password = models.CharField(max_length=128, null=False, verbose_name='密码md5')
    avatar = models.TextField(null=False, default='', verbose_name='头像地址')
    mail = models.EmailField(max_length=128, null=False, verbose_name='邮箱')
    is_active = models.BooleanField(default=False, verbose_name='是否激活')

    class Meta:
        db_table = 'user'
        verbose_name = '用户信息'
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.username
